package dev.ece.suit.hexmap.terrain.type;

import dev.ece.core.light.Material;
import dev.ece.suit.hexmap.HexMapCell;
import dev.ece.suit.hexmap.terrain.TerrainFactory;

@Deprecated
public class DefaultTerrainType implements TerrainType {

	private int textureIndex;
	
	private boolean water;
	
	private Material material;
	
	private int traffic;
	
	public DefaultTerrainType(int textureIndex) {
		this(TerrainType.TRIFFIC_WALK | TerrainType.TRIFFIC_FLY, textureIndex, false);
	}
	
	public DefaultTerrainType(Material material, int textureIndex) {
		this(TerrainType.TRIFFIC_WALK| TerrainType.TRIFFIC_FLY, material, textureIndex, false);
	}
	
	public DefaultTerrainType(int traffic, int textureIndex, boolean water) {
		this(traffic, new Material(), textureIndex, water);
		material.getDiffuse().set(0.5f, 0.5f, 0.5f);
		material.getSpecular().set(0f, 0f, 0f);
		material.setShininess(128);
	}
	
	public DefaultTerrainType(int traffic, Material material, int textureIndex, boolean water) {
		this.material = material;
		this.textureIndex = textureIndex;
		this.water = water;
		this.traffic = traffic;
	}
	
	@Override
	public void update(TerrainFactory terrainFactory, HexMapCell cell) {}
	
	@Override
	public boolean hasWater() {
		return water;
	}

	@Override
	public int getTextureIndex() {
		return textureIndex;
	}

	@Override
	public Material getMaterial() {
		return material;
	}

	@Override
	public int getTraffic() {
		return this.traffic;
	}


}
